import Loadable from 'react-loadable';

import home from '@pages/home';
import reduxDemo from '@pages/reactMng/reduxDemo'
import routerDemo from '@pages/reactMng/routerDemo'
// import tableDemo from '@pages/reactMng/tableDemo'
// import user from '@pages/system/user'
// import role from '@pages/system/role'

const role = Loadable({
	loader: () => import('@pages/system/role'),
	loading: ()=> '33333333',
	delay: 3000
})
const user = Loadable({
	loader: () => import('@pages/system/user'),
	loading: ()=> '33333333',
	delay: 3000
})
const tableDemo = Loadable({
	loader: () => import('@pages/reactMng/tableDemo'),
	loading: ()=> '33333333',
	delay: 3000
})
const routerData=[
    { path: '/', exact: true, component:  home},
    { path: '/react/reduxDemo', exact: true, component:  reduxDemo},
    { path: '/react/routerDemo', exact: true, component:  routerDemo},
    { path: '/react/tableDemo', exact: true, component:  tableDemo},
    { path: '/react/tableDemo/sub', exact: true, component:  routerDemo},

    { path: '/system/user', exact: true, component:  user},
    { path: '/system/role', exact: true, component: role}
]

const data = {
    list:  [{name: 'tom', age: 18},{name: 'loce', age: 28}],
    routerData
}

export const base = (state = data, action = {}) => {
    return state
};